home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 July: Mac OS SDK / Dev.CD Jul 99 SDK1.toast / Development Kits / Mac OS / Interfaces&Libraries / Universal / Interfaces / AIncludes / OSAGeneric.a < prev    next >
Encoding:
Text File  |  1998-08-17  |  4.5 KB  |  148 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        OSAGeneric.a
  3. ;
  4. ;    Contains:    AppleScript Generic Component Interfaces.
  5. ;
  6. ;    Version:    Technology:    AppleScript 1.1
  7. ;                Release:    Universal Interfaces 3.2
  8. ;
  9. ;    Copyright:    © 1992-1998 by Apple Computer, Inc., all rights reserved
  10. ;
  11. ;    Bugs?:        For bug reports, consult the following page on
  12. ;                the World Wide Web:
  13. ;
  14. ;                    http://developer.apple.com/bugreporter/
  15. ;
  16. ;
  17.     IF &TYPE('__OSAGENERIC__') = 'UNDEFINED' THEN
  18. __OSAGENERIC__ SET 1
  19.  
  20.     IF &TYPE('__ERRORS__') = 'UNDEFINED' THEN
  21.     include 'Errors.a'
  22.     ENDIF
  23.     IF &TYPE('__APPLEEVENTS__') = 'UNDEFINED' THEN
  24.     include 'AppleEvents.a'
  25.     ENDIF
  26.     IF &TYPE('__OSA__') = 'UNDEFINED' THEN
  27.     include 'OSA.a'
  28.     ENDIF
  29.  
  30. ;      NOTE:    This interface defines a "generic scripting component."
  31. ;            The Generic Scripting Component allows automatic dispatch to a
  32. ;            specific scripting component that conforms to the OSA interface.
  33. ;            This component supports OSA, by calling AppleScript or some other 
  34. ;            scripting component.  Additionally it provides access to the default
  35. ;            and the user-prefered scripting component.
  36. ;
  37.  
  38.  
  39.  
  40.  
  41.                                                             ; Component version this header file describes 
  42. kGenericComponentVersion        EQU        $0100
  43.  
  44. kGSSSelectGetDefaultScriptingComponent EQU $1001
  45. kGSSSelectSetDefaultScriptingComponent EQU $1002
  46. kGSSSelectGetScriptingComponent    EQU        $1003
  47. kGSSSelectGetScriptingComponentFromStored EQU $1004
  48. kGSSSelectGenericToRealID        EQU        $1005
  49. kGSSSelectRealToGenericID        EQU        $1006
  50. kGSSSelectOutOfRange            EQU        $1007
  51. ; typedef OSType                         ScriptingComponentSelector
  52.  
  53. ; typedef OSAID                         GenericID
  54.  
  55. ;  get and set the default scripting component 
  56. ;
  57. ; pascal OSAError OSAGetDefaultScriptingComponent(ComponentInstance genericScriptingComponent, ScriptingComponentSelector *scriptingSubType)
  58. ;
  59.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  60.         Macro
  61.         _OSAGetDefaultScriptingComponent
  62.             move.l              #$00041001,-(sp)
  63.             moveq               #0,D0
  64.             dc.w                $A82A
  65.         EndM
  66.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  67.         IMPORT_CFM_FUNCTION OSAGetDefaultScriptingComponent
  68.     ENDIF
  69.  
  70. ;
  71. ; pascal OSAError OSASetDefaultScriptingComponent(ComponentInstance genericScriptingComponent, ScriptingComponentSelector scriptingSubType)
  72. ;
  73.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  74.         Macro
  75.         _OSASetDefaultScriptingComponent
  76.             move.l              #$00041002,-(sp)
  77.             moveq               #0,D0
  78.             dc.w                $A82A
  79.         EndM
  80.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  81.         IMPORT_CFM_FUNCTION OSASetDefaultScriptingComponent
  82.     ENDIF
  83.  
  84. ;  get a scripting component instance from its subtype code 
  85. ;
  86. ; pascal OSAError OSAGetScriptingComponent(ComponentInstance genericScriptingComponent, ScriptingComponentSelector scriptingSubType, ComponentInstance *scriptingInstance)
  87. ;
  88.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  89.         Macro
  90.         _OSAGetScriptingComponent
  91.             move.l              #$00081003,-(sp)
  92.             moveq               #0,D0
  93.             dc.w                $A82A
  94.         EndM
  95.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  96.         IMPORT_CFM_FUNCTION OSAGetScriptingComponent
  97.     ENDIF
  98.  
  99. ;  get a scripting component selector (subType) from a stored script 
  100. ;
  101. ; pascal OSAError OSAGetScriptingComponentFromStored(ComponentInstance genericScriptingComponent, const AEDesc *scriptData, ScriptingComponentSelector *scriptingSubType)
  102. ;
  103.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  104.         Macro
  105.         _OSAGetScriptingComponentFromStored
  106.             move.l              #$00081004,-(sp)
  107.             moveq               #0,D0
  108.             dc.w                $A82A
  109.         EndM
  110.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  111.         IMPORT_CFM_FUNCTION OSAGetScriptingComponentFromStored
  112.     ENDIF
  113.  
  114. ;  get a real component instance and script id from a generic id 
  115. ;
  116. ; pascal OSAError OSAGenericToRealID(ComponentInstance genericScriptingComponent, OSAID *theScriptID, ComponentInstance *theExactComponent)
  117. ;
  118.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  119.         Macro
  120.         _OSAGenericToRealID
  121.             move.l              #$00081005,-(sp)
  122.             moveq               #0,D0
  123.             dc.w                $A82A
  124.         EndM
  125.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  126.         IMPORT_CFM_FUNCTION OSAGenericToRealID
  127.     ENDIF
  128.  
  129. ;  get a generic id from a real component instance and script id 
  130. ;
  131. ; pascal OSAError OSARealToGenericID(ComponentInstance genericScriptingComponent, OSAID *theScriptID, ComponentInstance theExactComponent)
  132. ;
  133.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  134.         Macro
  135.         _OSARealToGenericID
  136.             move.l              #$00081006,-(sp)
  137.             moveq               #0,D0
  138.             dc.w                $A82A
  139.         EndM
  140.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  141.         IMPORT_CFM_FUNCTION OSARealToGenericID
  142.     ENDIF
  143.  
  144.  
  145.  
  146.     ENDIF ; __OSAGENERIC__ 
  147.  
  148.